www.gusucode.com > VC 模拟银行系统ATM自动取款机-源码程序 > VC 模拟银行系统ATM自动取款机-源码程序/code/ATM/bank_impl.cpp
//Download by http://www.NewXing.com // ********************************************************************** // // Copyright (c) 2000 // Intervision Software Co., Ltd. // Haidian District, Beijing. // // All Rights Reserved // // ********************************************************************** #include "StdAfx.h" #include <STAR/CORBA.h> #include <bank_impl.h> #include <stdlib.h> #include <errno.h> #ifdef HAVE_FSTREAM # include <fstream> #else # include <fstream.h> #endif #ifdef HAVE_STD_IOSTREAM using namespace std; #endif // // Interface declare ::BankAccount // BankAccount_impl::BankAccount_impl() // : poa_(PortableServer::POA::_duplicate(poa)) { m_pDlg = NULL; } BankAccount_impl::~BankAccount_impl() { } // // Operation declare log // CORBA::Boolean BankAccount_impl::log(const char* id) throw(CORBA::SystemException) { m_pDlg->addListMsg("dddddddddddddd"); CString strRcv; CString strTemp; strTemp = m_pDlg->getFieldValue(id, "ID"); if(!strRcv.Compare((LPCSTR)strTemp)) { m_strID = id; strTemp.Format("帐号:%s,开始操作",m_strID); m_pDlg->addListMsg(strTemp); m_pDlg->UpdateData(FALSE); return TRUE; } else { return TRUE; } } // // Operation declare authentificate // CORBA::Boolean BankAccount_impl::authentificate(const char* password) throw(CORBA::SystemException) { return TRUE; } // // Operation declare requery // CORBA::Double BankAccount_impl::requery() throw(CORBA::SystemException) { return 100; } // // Operation declare authentificate // CORBA::Boolean BankAccount_impl::withdraw(CORBA::Short nMoney) throw(CORBA::SystemException) { return TRUE; } // // Operation declare deposit // CORBA::Boolean BankAccount_impl::deposit(CORBA::Short nMoney) throw(CORBA::SystemException) { return TRUE; } // // Operation declare deposit // CORBA::Boolean BankAccount_impl::alterPAW(const char* strPAW) throw(CORBA::SystemException) { return TRUE; } void BankAccount_impl::setDlg(CBankServerDlg* pDlg) { m_pDlg = pDlg; m_pDlg->addListMsg("开始服务!"); }